package mock

import (
	"fmt"

	"gitee.com/go-course/go11/devcloud-mini/cmdb/apps/secret"
	"github.com/infraboard/mcube/grpc/mock"
	"google.golang.org/grpc"
)

func NewSyncResourceServerMock() secret.Rpc_SyncResourceServer {
	return &SyncResourceServerMock{
		ServerStream: mock.NewServerStreamBase(),
	}
}

// 只是打印下需要发送的对象
type SyncResourceServerMock struct {
	grpc.ServerStream
}

func (m *SyncResourceServerMock) Send(
	resp *secret.SyncResourceResponse) error {
	fmt.Println(resp)
	return nil
}
